rearranging the terms of a series